package com.java.huxb.threadlocal;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author huxb
 * @date 2020/4/9 0009 下午 4:09
 */
public class ThreadLocal001 {
    public  String date(int seconds) {
        Date  date = new Date(1000 * seconds);
        SimpleDateFormat dateFormat = new SimpleDateFormat("YYYY-MM-dd hh:mm:ss");
       return dateFormat.format(date);
    }

    public static void main(String[] args) {
        new Thread(() -> {
            String date = new ThreadLocal001().date(100);
            System.out.println(date);
        }).start();
    }
}
